import { ref } from 'vue'

export async function fetchActivityData(activityId) {
  try {
    const response = await fetch(`/mock_json/${activityId || 'default'}.json`)
    return await response.json()
  } catch (error) {
    console.error('Failed to fetch activity data:', error)
    return null
  }
}

export async function fetchActivityDetails(activityId) {
  try {
    const response = await fetch(`/mock_json/${activityId || 'default'}_details.json`)
    return await response.json()
  } catch (error) {
    console.error('Failed to fetch activity details:', error)
    return null
  }
}